const reg1 = /o/g
const reg3 = /\w/
const reg2 = new RegExp(/\w/)

const res1 = "ooaoo".replace(reg1,'x')
const res3 = "ooaoo".replace(reg3,'x')